#ifndef __HAL_H
#define __HAL_H

#include "infra_types.h"


void HAL_Free(void *ptr);
void *HAL_Malloc(uint32_t size);
void *HAL_MutexCreate(void);
void HAL_MutexDestroy(void *mutex);
void HAL_MutexLock(void *mutex);
void HAL_MutexUnlock(void *mutex);
void HAL_Printf(const char *fmt, ...);
int HAL_TCP_Establish(const char *host, uint16_t port);
int32_t HAL_TCP_Read(int fd, char *buf, uint32_t len, uint32_t timeout_ms);
int32_t HAL_TCP_Write(int fd, const char *buf, uint32_t len, uint32_t timeout_ms);
int HAL_TCP_Destroy(int fd);
void HAL_SleepMs(uint32_t ms);
uint32_t HAL_tcp_client_heartbeat_packet_new(uint8_t **packet_buf);


#endif